///////////////////////////////////////////////////////////////////////////////
//
// Licensed under the MIT License
//
// Copyright (c) 2010 Chris Colinsky
// All Rights Reserved
//
// version	0.5
// http://code.google.com/p/sugarcookie/
// http://code.google.com/p/sugarcookie/wiki/License
//
////////////////////////////////////////////////////////////////////////////////

package sugarcookie.style.vo {
	/**
	 * Creates a single style object to be used with a StyleSheet.
	 */
	public class Style extends Object {
		private var _style:Object = {};
		private var _styleName:String;
		
		public function Style(name:String) {
			if (name.indexOf(".")!=0) name = "."+name;
			_styleName = name;
		}
		
		public function get name():String {
			return _styleName;
		}
		
		public function get style():Object {
			return _style;
		}
		
		//TODO: add validation to all set values
		public function set color(c:String):void {
			_style.color = c;
		}
		
		public function set display(d:String):void {
			_style.display = d;
		}
		
		public function set fontfamily(ff:String):void {
			_style.fontFamily = ff;
		}
		
		public function set fontSize(fs:Number):void {
			_style.fontSize = fs;
		}
		
		public function set fontWeight(fw:String):void {
			_style.fontWeight = fw;
		}
		
		public function set fontStyle(fs:String):void {
			_style.fontStyle = fs;	
		}
		
		public function set kerning(k:Boolean):void {
			_style.kerning = k;
		}
		
		public function set leading(l:Number):void {
			_style.leading = l;
		}
		
		public function set letterSpacing(ls:Number):void {
			_style.letterSpacing = ls;
		}
		
		public function set marginLeft(ml:Number):void {
			_style.marginLeft = ml;
		}
		
		public function set marginRight(mr:Number):void {
			_style.marginRight = mr;
		}
		
		public function set textAlign(ta:String):void {
			_style.textAlign = ta;
		}
		
		public function set textDecoration(td:String):void {
			_style.textDecoration = td;
		}
		
		public function set textIndent(ti:Number):void {
			_style.textIndent = ti;
		}
	}
}